--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit a2e6a06a356b1ef4cabbc9143a976a62464c8212
Parents : eac9021
Author : Mark Qvist <mark@unsigned.io>
Date : 2025-12-22T11:18:21+01:00
Added warning and explanation on corrupt peer settings file
Changes
Diff
diff --git a/nomadnet/NomadNetworkApp.py b/nomadnet/NomadNetworkApp.py
index ff554e6..80323a8 100644
--- a/nomadnet/NomadNetworkApp.py
+++ b/nomadnet/NomadNetworkApp.py
@@ -245,8 +245,10 @@ class NomadNetworkApp:
self.peer_settings["served_file_requests"] = 0
except Exception as e:
- RNS.log("Could not load local peer settings from "+self.peersettingspath, RNS.LOG_ERROR)
- RNS.log("The contained exception was: %s" % (str(e)), RNS.LOG_ERROR)
+ RNS.log(f"Could not load local peer settings from {self.peersettingspath}", RNS.LOG_ERROR)
+ RNS.log(f"The contained exception was: {e}", RNS.LOG_ERROR)
+ RNS.log(f"This likely means that the peer settings file has become corrupt.", RNS.LOG_ERROR)
+ RNS.log(f"You can try deleting the file at {self.peersettingspath} and restarting nomadnet.", RNS.LOG_ERROR)
nomadnet.panic()
else:
try:
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────